package com.abc.http.example.simple;

import java.util.List;

import org.springframework.http.HttpMethod;

import com.abc.http.example.common.model.HttpResult;
import com.abc.http.example.common.model.User;
import com.yansl.http.annotation.Http;
import com.yansl.http.annotation.Param;
import com.yansl.http.annotation.URI;

/**
 * @description: API接口 : 接口来源：com.yansl.http.example.api.IndexAPI
 * @author: yansl.cn
 * @create: 2023-01-16 17:35
 */
@Http
public interface SimpleAPI {
    @URI(httpMethod = HttpMethod.GET, uri = "http://127.0.0.1:8080/index/get")
    public HttpResult<String> get(@Param("name") String a);

    @URI(httpMethod = HttpMethod.GET, uri = "http://127.0.0.1:8080/index/getByUser")
    public HttpResult<User> getByUser();

    @URI(httpMethod = HttpMethod.GET, uri = "http://127.0.0.1:8080/index/list")
    public HttpResult<List<User>> list();

    @URI(httpMethod = HttpMethod.POST, uri = "http://127.0.0.1:8080/index/createUser")
    public HttpResult<User> createUser(User user);
}
